package com.ruoyi.exam.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.exam.mapper.PaperDetailQuestionResultMapper;
import com.ruoyi.exam.domain.PaperDetailQuestionResult;
import com.ruoyi.exam.service.IPaperDetailQuestionResultService;

/**
 * 考试试卷题目选项Service业务层处理
 * 
 * @author luqian
 * @date 2024-07-10
 */
@Service
public class PaperDetailQuestionResultServiceImpl implements IPaperDetailQuestionResultService 
{
    @Autowired
    private PaperDetailQuestionResultMapper paperDetailQuestionResultMapper;

    /**
     * 查询考试试卷题目选项
     * 
     * @param id 考试试卷题目选项主键
     * @return 考试试卷题目选项
     */
    @Override
    public PaperDetailQuestionResult selectPaperDetailQuestionResultById(Long id)
    {
        return paperDetailQuestionResultMapper.selectPaperDetailQuestionResultById(id);
    }

    /**
     * 查询考试试卷题目选项列表
     * 
     * @param paperDetailQuestionResult 考试试卷题目选项
     * @return 考试试卷题目选项
     */
    @Override
    public List<PaperDetailQuestionResult> selectPaperDetailQuestionResultList(PaperDetailQuestionResult paperDetailQuestionResult)
    {
        return paperDetailQuestionResultMapper.selectPaperDetailQuestionResultList(paperDetailQuestionResult);
    }

    /**
     * 新增考试试卷题目选项
     * 
     * @param paperDetailQuestionResult 考试试卷题目选项
     * @return 结果
     */
    @Override
    public int insertPaperDetailQuestionResult(PaperDetailQuestionResult paperDetailQuestionResult)
    {
        paperDetailQuestionResult.setCreateTime(DateUtils.getNowDate());
        return paperDetailQuestionResultMapper.insertPaperDetailQuestionResult(paperDetailQuestionResult);
    }

    /**
     * 修改考试试卷题目选项
     * 
     * @param paperDetailQuestionResult 考试试卷题目选项
     * @return 结果
     */
    @Override
    public int updatePaperDetailQuestionResult(PaperDetailQuestionResult paperDetailQuestionResult)
    {
        paperDetailQuestionResult.setUpdateTime(DateUtils.getNowDate());
        return paperDetailQuestionResultMapper.updatePaperDetailQuestionResult(paperDetailQuestionResult);
    }

    /**
     * 批量删除考试试卷题目选项
     * 
     * @param ids 需要删除的考试试卷题目选项主键
     * @return 结果
     */
    @Override
    public int deletePaperDetailQuestionResultByIds(Long[] ids)
    {
        return paperDetailQuestionResultMapper.deletePaperDetailQuestionResultByIds(ids);
    }

    /**
     * 删除考试试卷题目选项信息
     * 
     * @param id 考试试卷题目选项主键
     * @return 结果
     */
    @Override
    public int deletePaperDetailQuestionResultById(Long id)
    {
        return paperDetailQuestionResultMapper.deletePaperDetailQuestionResultById(id);
    }
}
